package service;

import java.sql.Date;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import contacts614.po.Room;
import contacts614.po.Student;
import dao.IStudentDao;
import dao.impl.StudentImpl;

public class StudentService {
	private IStudentDao studentDao = new StudentImpl();

	/**
	 * 增加学生信息
	 * 
	 * @param student
	 */
	public void addStudent(Student student) {
		studentDao.addStudent(student);
	}

	/**
	 * 修改学生信息
	 * 
	 * @param studentNo
	 * @param student
	 */
	public void updateStudent(Student student) {
		studentDao.updateStudent(student);
	}

	/**
	 * 删除学生信息
	 * 
	 * @param studentNo
	 */
	public void deleteStudent(String studentNo) {
		studentDao.deleteStudent(studentNo);
	}

	/**
	 * 查询一个学生的信息
	 * 
	 * @param studentNo
	 * @return
	 */
	public Student getStudent(String studentNo) {
		return studentDao.findOneStudent(studentNo);
	}

	/**
	 * 查询所有学生信息
	 * 
	 * @return
	 */
	public List<Student> findAllStudent() {
		return studentDao.findAllStudent();
	}

}
